<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui">

    <h:head>
        <title>Satın Almacı Teklifleri Görüntüleme Sayfası</title>
        <link href="../style.css" rel="stylesheet" type="text/css"></link>
        <div style="text-align: center;height:139px;background-color: #2D99FF"></div>

    </h:head>
    <h:body>
      
            <div id="wrapper">
                <div id="logo">

                </div>
                <div id="header">
                    <!-- 		<div id="menu">
                    
                            </div>    -->
                </div>
                <div class="page">
                    <div id="page-bgtop">

                        <div id="dummy"></div>
                        
                        <p:panel id="panelsidebar" header="Pages Menu">
                            <ui:include src="MenuSatinAlmaci.xhtml"/>
                        </p:panel>
                            
                        <!-- end #sidebar -->

                        <div id="content">
                            <h:form>
                            <p:panel id="panel" header="Teklifleri Görüntüle">
                                <p:dataTable id="dtable" var="teklif" value="#{teklifbean.teklifler}">  
                                    <p:column>  
                                        <f:facet name="header">  
                                            Kalem Adı  
                                        </f:facet>  
                                        <h:outputText value="#{teklif.kalem.kalemAdi}" />  
                                    </p:column>  
                                    
                                    
                                     <p:column>  
                                        <f:facet name="header">  
                                            Miktarı  
                                        </f:facet>  
                                         <h:outputText value="#{teklif.kalem.miktari}" />  
                                    </p:column> 
                                    
                                    
                                     <p:column>  
                                        <f:facet name="header">  
                                            Birimi  
                                        </f:facet>  
                                         <h:outputText value="#{teklif.kalem.birim}" />  
                                    </p:column> 
                                    
                                    <p:column>  
                                        <f:facet name="header">  
                                            Tedarikçi Adı  
                                        </f:facet>  
                                        <h:outputText value="#{teklif.tedarikci.sirketAdi}" />  
                                    </p:column>  

                                    <p:column>  
                                        <f:facet name="header">  
                                            Teklif Tutarı     
                                        </f:facet>  
                                        <h:outputText value="#{teklif.teklif}" style="#{teklif.min == true ? 'color:green;background-color: #20c3cc' : 'color: black'}"/>  
                                    </p:column>  

                                    
                                </p:dataTable>  
                                <p:poll interval="3"   
                                        listener="#{teklifbean.guncelleTeklifler}" update="panel" />  
                                   <h:outputText value="En Düşük teklifi "/> 
                                   <p:commandButton ajax="false" value="#{teklifbean.minTeklif.tedarikci.sirketAdi}" onclick="dlg1.show();" type="button"/>
                        
                                <h:outputText value=" "/> 
                                <h:outputText value="#{teklifbean.minTeklif.teklif}" style="color:blue"/> 
                                <h:outputText value=" TL "/> 
                                <h:outputText value=" olarak vermiştir "/>     
                                    <p:dialog header="Tedarikçi Detayları" widgetVar="dlg1" modal="true">  
                                 <h:panelGrid columns="2">
                                     <h:outputText value="Şirket Adı:"/>
                                     <h:outputText value="#{teklifbean.minTeklif.tedarikci.sirketAdi}"/>
                                     <h:outputText value="İlgili Kişi:"/>
                                     <h:outputText value="#{teklifbean.minTeklif.tedarikci.ilgiliKisi}"/>
                                     <h:outputText value="E Posta:"/>
                                     <h:outputText value="#{teklifbean.minTeklif.tedarikci.eposta}"/>
                                     <h:outputText value="Web Sitesi:"/>
                                     <h:outputText value="#{teklifbean.minTeklif.tedarikci.webSite}"/>
                                      <h:outputText value="Adres:"/>
                                      <h:outputText value="#{teklifbean.minTeklif.tedarikci.adres}"/>
                                 </h:panelGrid>
                         </p:dialog>  
                            </p:panel> 
                             
                               
                           </h:form>
                         
                         
                        </div>
                        <!-- end #content -->

                        <div style="clear: both;">&nbsp;</div>
                    </div>

                    <!-- end #page -->

                </div>
                <div id="footer-bgcontent">
                    <div id="footer" align="center">
                        <p>İHALE YÖNETİM SİSTEMİ - 2011</p>
                    </div>
                </div>
                <!-- end #footer -->
            </div>

        
    </h:body>
</html>
